home *** CD-ROM | disk | FTP | other *** search
- Path: electra.saaf.se!not-for-mail
- From: pausch@electra.saaf.se (Paul Schlyter)
- Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
- Subject: Re: Access carry flag from C
- Date: 5 Mar 1996 17:19:17 +0100
- Organization: Svensk Amat|rAstronomisk F|rening
- Message-ID: <4hhpi5$a98@electra.saaf.se>
- References: <Dn1C9z.DGv.0.net@indra.com> <TANMOY.96Feb23101510@qcd.lanl.gov> <313178D5.41C6@bazis.nl> <4gvdfv$bp7@doc.armltd.co.uk>
- NNTP-Posting-Host: electra.saaf.se
-
- In article <4gvdfv$bp7@doc.armltd.co.uk>,
- David Seal <dseal@armltd.co.uk> wrote:
- Article: 1549 of comp.arch.arithmetic
-
- > Franz Korntner <fkorntne@bazis.nl> writes:
- >
- > There are three values to consider from the standard:
- >
- > (1) +32767
- >
- > (2) INT_MAX (or to be completely precise, the constant expression that
- > INT_MAX is expanded to by the preprocessor).
- >
- > (3) The maximum value that the implementation allows a variable of
- > type "int" to take before undefined behaviour occurs.
- >
- > As you say, the standard says that +32767 is the smallest value that
- > INT_MAX may be - i.e. that value (1) <= value (2). But as Tanmoy
- > Bhattacharya points out, it *also* says that value (2) is *equal* to
- > value (3). In short, the requirements imposed by the standard are:
- >
- > Value (1) < Value (2) = Value (3)
-
- A minor correction: the requirements imposed by the standard are:
-
- Value (1) <= Value (2) = Value (3)
-
- i.e. +32767 is a legal value of INT_MAX
-
- --
- ----------------------------------------------------------------
- Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
- Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
- e-mail: pausch@saaf.se psr@home.ausys.se
-